const token = "90f0bcfa14cf4aa0a4c925c1cc896da3"
const accessToken = ""
const refreshToken = ""

const tokenCheck = function () {
    console.log("token");
    axios({
        method: "post",
        url: "http://jqapi.gftest.cloudns.asia:88/user/tokenValidate.json", // 金桥
        headers: {
            // "X-Requested-With": "XMLHttpRequest",
            // "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
            "AUTHORIZATION": "76c2cbef87704715450efce21d9eba72"
        }
    })
    .then(res => {
        console.log(res);
        return res;
    })
}

const getCookie = function(name) {
    var arr,
        reg = new RegExp("(^| )" + name + "=([^;]*)(;|$)");
    if (arr = document.cookie.match(reg))
        return unescape(arr[2]);
    else
        return null;
}

const mapStyle = [
    {
        "featureType":"land",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#f6f7f7"
        }
    },
    {
        "featureType":"land",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#e2f2f7"
        }
    },
    {
        "featureType":"water",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#b8e1ed"
        }
    },
    {
        "featureType":"water",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#93b1d2"
        }
    },
    {
        "featureType":"green",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#d9eae3"
        }
    },
    {
        "featureType":"green",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#329ec5"
        }
    },
    {
        "featureType":"building",
        "elementType":"geometry",
        "stylers":{
            "color":"#f5f5f5"
        }
    },
    {
        "featureType":"highway",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#faf3d6"
        }
    },
    {
        "featureType":"highway",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#fae3b4"
        }
    },
    {
        "featureType":"highway",
        "elementType":"labels.text.fill",
        "stylers":{
            "color":"#7a97a4"
        }
    },
    {
        "featureType":"highway",
        "elementType":"labels.text.stroke",
        "stylers":{
            "color":"#fafafa"
        }
    },
    {
        "featureType":"arterial",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#fafafa"
        }
    },
    {
        "featureType":"arterial",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#e0e6e8"
        }
    },
    {
        "featureType":"arterial",
        "elementType":"labels.text.fill",
        "stylers":{
            "color":"#7a97a4"
        }
    },
    {
        "featureType":"arterial",
        "elementType":"labels.text.stroke",
        "stylers":{
            "color":"#fafafa"
        }
    },
    {
        "featureType":"local",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#fafafa"
        }
    },
    {
        "featureType":"local",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#e0e6e8"
        }
    },
    {
        "featureType":"railway",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"",
            "visibility": "off"
        }
    },
    {
        "featureType":"railway",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#dcdcdc"
        }
    },
    {
        "featureType":"subway",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#d9dfea"
        }
    },
    {
        "featureType":"subway",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#fafafa"
        }
    },
    {
        "featureType":"boundary",
        "elementType":"geometry.fill",
        "stylers":{
            "color":"#e0e6e8"
        }
    },
    {
        "featureType":"boundary",
        "elementType":"geometry.stroke",
        "stylers":{
            "color":"#fa0000"
        }
    },
    {
        "featureType":"poilabel",
        "elementType":"labels.text.fill",
        "stylers":{
            "color":"#90c2c5"
        }
    },
    {
        "featureType":"poilabel",
        "elementType":"labels.text.stroke",
        "stylers":{
            "color":"#fafafa"
        }
    },
    {
        "featureType":"districtlable",
        "elementType":"labels.text.fill",
        "stylers":{
            "color":""
        }
    },
    {
        "featureType":"districtlable",
        "elementType":"labels.text.stroke",
        "stylers":{
            "color":""
        }
    },
    {
        "featureType": "land",
        "elementType": "all",
        "stylers": {
                  "color": "#f5f7f4"
        }
    },
    {
        "featureType": "manmade",
        "elementType": "all",
        "stylers": {
                  "color": "#eaece9"
        }
    }
]
// 后两条是我在App取的色


const parkingid = "1544596a-8436-11e5-8bcf-feff819cdc9f"
const userPickCityCode = "010"
const positionLon = ""
const positionLat = ""
export default{
  token,
  accessToken,
  refreshToken,
  tokenCheck,
  getCookie,
  mapStyle,

  parkingid,
  positionLon,
  positionLat,
  userPickCityCode
}
